import { useInitDataSingleton } from './shared';
import { BasShuXueJianYanApi, BasShuXueJianYanAllOutput } from '/@/api/bas/BasShuXueJianYan';

const { list, initList: getBasShuXueJianYanList } = useInitDataSingleton<BasShuXueJianYanAllOutput>(BasShuXueJianYanApi.all);

// 血液来源, 不常用资料, 按需加载
export { getBasShuXueJianYanList };

// 通过id获取
export async function getBasShuXueJianYan(id: number) {
	await getBasShuXueJianYanList();
	return list.value.find((item) => item.id == id);
}

